﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Renci.iRods.Common;

namespace Renci.iRods.Data
{
    public class Rule : DataItem
    {
        [iRodsColumn(DataObjectAttributes.COL_RULE_ID)]
        public long ID { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_VERSION)]
        public string Version { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_BASE_NAME)]
        public string BaseName { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_NAME)]
        public string Name { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_EVENT)]
        public string Event { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_CONDITION)]
        public string Condition { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_BODY)]
        public string Body { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_RECOVERY)]
        public string Recovery { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_STATUS)]
        public long Status { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_OWNER_NAME)]
        public string OwnerName { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_OWNER_ZONE)]
        public string OwnerZone { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_DESCR_1)]
        public string Description1 { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_DESCR_2)]
        public string Description2 { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_INPUT_PARAMS)]
        public string InputParameters { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_OUTPUT_PARAMS)]
        public string OutputParameters { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_DOLLAR_VARS)]
        public string PolarVariables { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_ICAT_ELEMENTS)]
        public string ICatElements { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_SIDEEFFECTS)]
        public string SidEffeects { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_COMMENT)]
        public string Comment { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_CREATE_TIME)]
        public DateTime CreatedTime { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_MODIFY_TIME)]
        public DateTime ModifiedTime { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_BASE_MAP_VERSION)]
        public string BaseMapVersion { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_BASE_MAP_BASE_NAME)]
        public string BaseMapName { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_BASE_MAP_OWNER_NAME)]
        public string BaseMapOwnerName { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_BASE_MAP_OWNER_ZONE)]
        public string BaseMapOwnerZone { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_BASE_MAP_COMMENT)]
        public string BaseMapComment { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_BASE_MAP_CREATE_TIME)]
        public DateTime BaseMapCreatedTime { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_BASE_MAP_MODIFY_TIME)]
        public DateTime BaseMapModifiedTime { get; internal set; }

        [iRodsColumn(DataObjectAttributes.COL_RULE_BASE_MAP_PRIORITY)]
        public int BaseMapPriority { get; internal set; }

        internal Rule(IRodsConnection connection)
            : base(connection)
        {

        }
    }
}
